package com.droidathletics.control;

import com.droidathletics.R;
import com.droidathletics.boundary.MainMenu;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class LoginTrainer extends Activity {
    /** Called when the activity is first created. */
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);
        
        Spinner trainerSpinner = (Spinner) findViewById(R.id.trainersSpinner);
        ArrayAdapter adapter = ArrayAdapter.createFromResource( 
        		this, 
        		R.array.trainers, 
        		android.R.layout.simple_spinner_item);
        
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        trainerSpinner.setAdapter(adapter); 
        
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        
        continueButton = (Button) findViewById(R.id.continueButton);

        continueButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	finish();
            	Intent intent = new Intent(LoginTrainer.this, MainMenu.class);
            	startActivity(intent);
            }
        });
    }
    
    @Override
    public void onBackPressed() {
        finish();
	    return;
    }
    
    private Button continueButton;
    
}
